Skip to main content

mobileStoreConfirmPurchase

Type​

command

Summary​

Inform the store that the purchase identifier productID was successfully delivered.

Syntax​

mobileStoreConfirmPurchase <productID>

Description​

Use the mobileStoreConfirmPurchase command to notify the store that a purchase was successfully delivered.

The command mobileStoreConfirmPurchase is used to notify the store that a purchase was successfully delivered. This informs the store to stop sending In that way, the store stops sending purchaseStateUpdate messages.

note

This function is used for iOS, but it is a good practice to use it for any store. This command should only be called in the "paymentReceived" or "restored" state, see example. If you call mobileStoreDisablePurchaseUpdates without first calling mobileStoreConfirmPurchase, then you receive a purchaseStateUpdate message with state "paymentReceived" or "restored", the next time you call mobileStoreEnablePurchaseUpdates.

Parameters​

NameTypeDescription

productID

The identifier of the product for which you want to inform the store that it was successfully delivered.

Examples​

on purchaseStateUpdate pPurchaseID, pProductID, pState
switch pState
case "paymentReceived"
offerPurchasedItem pProductID
mobileStoreConfirmPurchase pProductID
mobileStoreDisablePurchaseUpdates

case "error"
...
mobileStoreDisablePurchaseUpdates

case "invalidSKU"
...
mobileStoreDisablePurchaseUpdates

case "alreadyEntitled"
...
mobileStoreDisablePurchaseUpdates

case "restored"
offerPurchasedItem pProductID
mobileStoreConfirmPurchase pProductID
mobileStoreDisablePurchaseUpdates

case "cancelled"
...
mobileStoreDisablePurchaseUpdates

end switch
end purchaseStateUpdate

command: mobileStoreRestorePurchases, mobileStoreDisablePurchaseUpdates, mobileStoreEnablePurchaseUpdates, mobileStoreRequestProductDetails, mobileStoreMakePurchase, mobileStoreSetProductType, mobileStoreConsumePurchase, mobileStoreVerifyPurchase

function: mobileStoreProductProperty, mobileStorePurchaseError, mobileStorePurchasedProducts, mobileStoreCanMakePurchase

message: purchaseStateUpdate, productRequestError, productDetailsReceived

Compatibility and Support​

Introduced

LiveCode 6.7

Thank you for your feedback!

Was this page helpful?